package me.sdau.spider.manager.modules.system.entity;

import com.google.common.collect.Lists;
import lombok.*;
import me.sdau.spider.manager.common.entity.BaseEntity;

import java.time.Instant;
import java.util.List;

/**
 * 用户信息表
 * @author zj
 * @date 2018/4/8 14:57
 */
@Data
@Builder
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class User extends BaseEntity {
    private static final long serialVersionUID = -4099693684920918063L;
    /** 用户名*/
    private String username;
    /** 密码*/
    private String password;
    /** 盐*/
    private String salt;
    /** 邮箱*/
    private String email;
    /** 手机号*/
    private String phone;
    /** 性别*/
    private Integer sex;
    /** 上次登录 IP*/
    private String lastLoginIp;
    /** 上次登录时间*/
    private Instant lastLoginDate;

    /** 角色*/
    private List<Role> roles = Lists.newArrayList();

}
